package order;

import java.sql.*;
import java.io.*;
import java.util.*;

import common.db.*;
import common.main.*;

public class OrderInfoBean extends MainBean
{
	public void funcExecute() throws Exception
	{
		String id = (String)inputTable.get("id");
		
		queryBuffer = new StringBuffer("");
		queryBuffer.append("SELECT ");
		queryBuffer.append("a.CODE, a.GOODS_CODE, a.SHOPPER_ID, a.PURCHARSE_VALUE, a.ORDER_STATE, ");
		queryBuffer.append("a.PAYMENT_WAY, a.DELIVERY_METHOD, a.OR_DATE, a.GY_DATE, a.BA_DATE, a.EN_DATE, ");
		queryBuffer.append("a.COMPLETION_YN, a.SAVING_POINT, a.BY_DATE, a.BY_START_DATE, ");
		queryBuffer.append("a.REG_ID, a.REG_DATE, a.REG_IP, a.UPD_ID, a.UPD_DATE, a.UPD_IP, a.USE_YN, ");
		queryBuffer.append("a.RECEIVER, a.RECEIVER_PHONE1, a.RECEIVER_PHONE2, a.RECEIVER_PHONE3, a.EMERGENCY1, a.EMERGENCY2, a.EMERGENCY3, ");
		queryBuffer.append("a.ZIPCODE1, a.ZIPCODE2, a.ADDR1, a.ADDR2, a.REQUIRE, a.USE_POINT, a.BANK_CODE, ");
		queryBuffer.append("b.GNAME, b.SAVING_POINT, b.GOODS_PRICE, c.NAME, c.EMAIL, d.BANK_NAME, d.BANK_ACCOUNT ");
		queryBuffer.append("FROM ORDERLIST a, GOODS b, SMEMBER c, ADMIN_ACCOUNT d WHERE a.GOODS_CODE=b.GCODE AND a.SHOPPER_ID='"+id+"' AND a.SHOPPER_ID=c.ID AND d.CODE=a.BANK_CODE AND a.ORDER_STATE=3 AND a.USE_YN='Y'");

		DBExecute dbe = new DBExecute(queryBuffer.toString());
		outputList = dbe.getDataList();
	}
}